<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>生成式病历示范应用</title>
    <link rel="stylesheet" href="css/index.css">
</head>

<body>
    <script src="js/config.js" charset="UTF-8"></script>
    <script src="js/recorder-core.js" charset="UTF-8"></script>
    <script src="js/wav.js" charset="UTF-8"></script>
    <script src="js/pcm.js" charset="UTF-8"></script>
    <div class="title">生成式病历
        <div class="subtitle">Patient ID:<div id="patientID">123456789</div>
        </div>
    </div>
    <button class="arrow-button" id="arrowButton"></button>
    <div class="app-container">
        <div class="sidebar">
            <div class="selection">
                录音模式:
                <label><input name="recoder_mode" onclick="on_recoder_mode_change()" type="radio" value="mic"
                        checked="true" />麦克风 </label>&nbsp;&nbsp;
                <label><input name="recoder_mode" onclick="on_recoder_mode_change()" type="radio"
                        value="file" />文件</label>
            </div>
            <div id="mic_mode_div" class="selection">
                ASR模型:
                <label><input name="asr_mode" type="radio" value="2pass" checked="true" />2pass </label>&nbsp;&nbsp;
                <label><input name="asr_mode" type="radio" value="online" />online </label>&nbsp;&nbsp;
                <label><input name="asr_mode" type="radio" value="offline" />offline </label>
            </div>
            <div id="rec_mode_div" class="selection">
                <input type="file" id="upfile">
            </div>
            <div id="use_itn_div" class="selection">
                逆文本标准化(ITN):
                <label><input name="use_itn" type="radio" value="false" checked="true" />否 </label>&nbsp;&nbsp;
                <label><input name="use_itn" type="radio" value="true" />是 </label>
            </div>
            <div class="input-config">
                <div class="input-card">
                    ASR服务
                    <input id="wssip" type="text" onchange="addresschange()" value="ws://127.0.0.1:10095/" />
                </div>
                <div class="input-card">
                    <textarea rows="3" id="varHot">阿里巴巴 20&#13;hello world 40</textarea>
                </div>
            </div>
            <textarea rows="10" id="varArea" class="input-box"></textarea>
            <div id="info_div">请点击开始</div>
            <div class="div_class_buttons">
                <button id="btnConnect">连接</button>
                <button id="btnStart">开始</button>
                <button id="btnStop">停止</button>
            </div>
            <audio id="audio_record" type="audio/wav" controls></audio>
            <button id="submitBtn" class="submit-btn">生成病历</button>
        </div>
        <div class="content">
            <title>生成式病历</title>
            <div id="markdownOutput" class="markdown-output"></div>
            <button id="feedbackBtn" class="feedback-button" disabled>一键回写</button>
        </div>
    </div>

    <div class="ai-icon" id="aiIcon">
        <img src="https://img.icons8.com/ios-filled/50/ffffff/chat--v1.png" alt="AI助手">
    </div>

    <div class="ai-assistant" id="aiAssistant">
        <div class="ai-header">AI 助手</div>
        <div class="ai-content" id="aiContent"></div>
        <div class="ai-input">
            <input id="aiInput" type="text" placeholder="问我点什么...">
            <button id="aiSendBtn">发送</button>
        </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/marked@4.3.0/marked.min.js"></script>
    <script src="js/ai-assitant.js" charset="utf-8"></script>
    <script src="js/medical-record.js" charset="utf-8"></script>
    <script src="js/arrow.js" charset="utf-8"></script>
    <script src="js/wsconnecter.js" charset="utf-8"></script>
    <script src="js/main.js" charset="utf-8"></script>

</body>

</html>